home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / Amiga Plus 1.adf / Programming / sampleinit.c < prev    next >
C/C++ Source or Header  |  1978-04-08  |  3KB  |  83 lines

  1. /* :ts=8 */
  2. /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  3. /*                                                              */
  4. /*      SampleInit.c                                            */
  5. /*                                                              */
  6. /*      Init routine for AmigaPLUS article about Intuition     */
  7. /*      Written by Michael G. Lehman                            */
  8. /*      of Intuitive Technologies                               */
  9. /*                                                              */
  10. /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  11.  
  12.  
  13. /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  14. /*      Complete Include file for Amiga programs                */
  15. /*      Derived from examples supplied by Commodore Amiga       */
  16. /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  17.  
  18.  
  19. #include <exec/types.h>
  20. #include <exec/nodes.h>
  21. #include <exec/lists.h>
  22. #include <exec/memory.h>
  23. #include <exec/ports.h>
  24. #include <exec/tasks.h>
  25. #include <exec/libraries.h>
  26. #include <exec/devices.h>
  27. #include <exec/io.h>
  28. #include <exec/devices.h>
  29.  
  30. #include <libraries/dos.h>
  31.  
  32. #include <graphics/gfx.h> /* ALWAYS INCLUDE GFX.H before other includes */
  33. #include <graphics/display.h>
  34. #include <graphics/clip.h>
  35. #include <graphics/rastport.h>
  36. #include <graphics/gfxbase.h>
  37. #include <graphics/text.h>
  38. #include <graphics/regions.h>
  39. #include <graphics/copper.h>
  40. #include <graphics/gels.h>
  41.  
  42. #include <devices/inputevent.h>
  43. #include <devices/gameport.h>
  44. #include <devices/console.h>
  45. #include <devices/keymap.h>
  46.  
  47. #include <intuition/intuition.h>
  48.  
  49.  
  50. extern UBYTE * AllocMem();
  51.  
  52. #define SECONDS io_Actual
  53. #define MICROSECONDS io_Length
  54.  
  55. extern struct Window *window;
  56.  
  57.  
  58. struct NewWindow nw = {
  59.         0, 11,                   /* start position               */
  60.         640, 189,               /* width, height                */
  61.         0, 1,                   /* detail pen, block pen        */
  62.         MENUPICK,
  63.         ACTIVATE | WINDOWDEPTH |
  64.         SIMPLE_REFRESH |  REPORTMOUSE,
  65.                                 /* window flags                 */
  66.         NULL,                   /* pointer to first user gadget */
  67.         NULL,                   /* pointer to user checkmark    */
  68.         "Intuition Plus Window",/* window title         */
  69.         NULL,                   /* pointer to screen    (later) */
  70.         NULL,                   /* pointer to superbitmap       */
  71.         0,0,0,0,                /* ignored/not a sized window so
  72.                                  * dont have to specify min/max
  73.                                  * size to allow                */
  74.         WBENCHSCREEN            /* type of screen in which to open */
  75.         };
  76.  
  77. InitAppl()
  78. {
  79.   window = OpenWindow(&nw);
  80. }
  81.  
  82.  
  83.